\section{A section}
\label{sec:a section}

This is a section. Example sections may be the \textit{introduction}, \textit{problem description}, etc.

You may reference a section by using labels and references, as shown for example in Section \ref{sec:another section}.


\section{Another section}
\label{sec:another section}

This is another section.


\section*{Unnumbered section}
\label{sec:unnumbered section}

This is a section, but it has no section number and it does not appear in the table of contents.


\section{Text modifiers}
\label{sec:text modifiers}

We can add ``quotation marks'' by using apostrophes.

We can make text \textit{italic}, \textbf{bold}, and even \underline{underlined}.

\begin{center}
Text may also be centered.
\end{center}


\section{Tables and lists}
\label{sec:tables and lists}

We can group multiple items in lists, enumerations, or even tables.

Lists and enumerations, which may be nested to arbitrary depths, require a simple environment:

\begin{enumerate}
\item number one
\item number two, which actually contains multiple sub-items:
\begin{itemize}
\item a
\item b
\end{itemize}
\item number three
\end{enumerate}

Tables require their own separate environment, and any kind of alignment may be used:

\begin{table}
\center
\label{tab:a table}
\begin{tabular}{ | l | r | p{2.5cm} | }

\hline

$\alpha$ & $\beta$ & some text goes here \\

\hline

$\gamma$ & $\delta$ & some more text goes here \\

\hline

\end{tabular}
\caption{Caption for a table}
\end{table}


\section{Figures}
\label{sec:figures}

We can include figures, but be warned: surprisingly, \LaTeX{} is a bit picky when it comes to pictures. See Figure \ref{fig:a picture} for an example picture. Also, figures end up wherever \LaTeX{} decides to preserve optimal word positioning, and you have no control whatsoever over that.

\begin{figure}
\center
\label{fig:a picture}
\includegraphics[width=9cm]{images/pic.png}
\caption{A picture}
\end{figure}


\section{Sources}
\label{sec:sources}
Go coders go! \LaTeX{} can properly show code in multiple languages.

An example in ML, my favorite language in the world:
\begin{lstlisting}[language=caml]
let rec map f l = 
  match l with 
  | [] -> [] 
  | x::xs -> f x :: map f xs

in [1..10] |> map ((+) 1)
\end{lstlisting}

An example in Pascal, my first language ever (and definitely not my favorite):
\begin{lstlisting}[language=Pascal]
for i:=maxint to 0 do
begin
{ do nothing }
end;
Write('Case insensitive ');
WritE('Pascal keywords.');
\end{lstlisting}

An example in C, a very powerful but somewhat dangerous language:
\begin{lstlisting}[language=C]
static char *wordlist[] = {
  "print", "out", "the", 
  "text", "message" };
static int listSize = 
  (sizeof(wordlist)/sizeof(wordlist[0]));
int i;
 
for (i=0; i<listSize; i++)
  puts(wordlist[i]);
for (i=listSize-1; i>=0; i--)
  puts(wordlist[i]);
\end{lstlisting}


\section{Mathematical typesetting}
\LaTeX{} is very strong when it comes to typesetting mathematical formulas. For example, we can easily write symbols such as: $\alpha$, $\beta \leq \gamma$, etc.

Symbols may be easily combined together as exponents or subscripts: $x^{\alpha}_{3 \times \beta}$.

We can write roots with a simple command: $\sqrt{\alpha^2} = \sqrt[4]{\alpha^4}$

Mathematical formulas and equations may also be setup to use a single line:

$$
\frac{x^n-1}{x-1} = \sum_{k=0}^{n-1}x^k
$$

We can even put symbols above and below formulas, even though there should not be many cases when you actually need such advanced usage scenario:

$$
\frac
{\overbrace{(m+n)(m+n-1)\cdots(n+1)}^{\mbox{$m$ factors}}}
{\underbrace{m(m-1)\cdots 1}_{\mbox{$m$ factors}}}
$$

When writing a known function such as sine, cosine, etc. you can make sure that it gets typeset as a function and not a series of symbols multiplied together:

$$\cos \theta \ne cos \theta$$

\subsection{Operators and relations}
\LaTeX{} really supports more operators than you will ever use:

$$\pm, \mp, \cdot, \star, \ddagger, \wedge, \vee, \circ, \dots$$

The same goes for relations:

$$\le, \ne, \ll, \doteq, \subset, \in, \equiv, \parallel, \dots$$

All relations can be negated:

$$\not\le, \not\ne, \not\ll, \not\doteq, \not\subset, \not\in, \not\equiv, \not\parallel, \dots$$


\section{References}
\label{sec:references}
In a paper, an essay, or a dissertation, references are of paramount importance. References require that the end of the document contains a bibliography style, and a link to a bibliography file. Citations are then added with the cite command: \cite{MD}. Citations may also be grouped together, always with the same command: \cite{WA, WP}.
